<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习记录 - 学知题库</title>
    <link href="../assets/css/app.css" rel="stylesheet">
    <link href="../assets/css/font-awesome.min.css" rel="stylesheet">
    <script src="../assets/js/chart.umd.min.js"></script>
    
    <!-- Tailwind 配置 - 已合并到公共配置文件 -->
    <!-- 
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    -->
    
    <!-- 工具类样式 - 已合并到 src/input.css -->
    <!-- 
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .card-hover {
                transition: all 0.3s ease;
            }
            .card-hover:hover {
                transform: translateY(-5px);
                box-shadow: 0 10px 20px rgba(0,0,0,0.08);
            }
            .bg-gradient-primary {
                background: linear-gradient(135deg, #165DFF 0%, #0E42B3 100%);
            }
            .progress-ring-circle {
                transition: stroke-dashoffset 0.35s;
                transform: rotate(-90deg);
                transform-origin: 50% 50%;
            }
            .animate-float {
                animation: float 3s ease-in-out infinite;
            }
            @keyframes float {
                0% { transform: translateY(0px); }
                50% { transform: translateY(-10px); }
                100% { transform: translateY(0px); }
            }
        }
    </style>
    -->
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <a href="#" class="flex items-center">
                    <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                    <h1 class="text-xl font-bold text-gray-800">学知题库</h1>
                </a>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">学习路径</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">模拟考试</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">关于我们</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="relative hidden md:block">
                    <input type="text" placeholder="搜索题目、知识点或教材..." 
                           class="pl-10 pr-4 py-2 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all w-64">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
                
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <img src="https://picsum.photos/40/40?random=user" alt="用户头像" class="w-10 h-10 rounded-full border-2 border-primary">
                    </div>
                    <span class="hidden md:inline text-gray-700">张同学</span>
                </div>
            </div>
        </div>
    </header>

    <!-- 主内容区（学习记录页面） -->
    <main class="flex-1 py-8 bg-gray-50">
        <div class="container mx-auto px-4">
            <!-- 页面标题 -->
            <div class="mb-8">
                <h2 class="text-2xl font-bold text-gray-800">学习记录</h2>
                <p class="text-gray-500 mt-1">查看您的学习历程、做题记录和进度数据</p>
            </div>

            <!-- 数据概览 -->
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">总做题数</h3>
                        <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center">
                            <i class="fa fa-pencil text-primary"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">1,286</span>
                        <span class="text-success flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-up mr-1"></i>12.5%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">较上周增长</p>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">正确率</h3>
                        <div class="w-10 h-10 rounded-full bg-success/10 flex items-center justify-center">
                            <i class="fa fa-check text-success"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">78%</span>
                        <span class="text-success flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-up mr-1"></i>3.2%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">较上周增长</p>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-6 card-hover">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="text-gray-600 font-medium">学习时长</h3>
                        <div class="w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center">
                            <i class="fa fa-clock-o text-accent"></i>
                        </div>
                    </div>
                    <div class="flex items-end gap-2">
                        <span class="text-3xl font-bold text-gray-800">36.5h</span>
                        <span class="text-danger flex items-center text-sm mb-1">
                            <i class="fa fa-arrow-down mr-1"></i>2.1%
                        </span>
                    </div>
                    <p class="text-gray-500 text-sm mt-2">较上周变化</p>
                </div>
            </div>

            <!-- 学习趋势图表 -->
            <div class="bg-white rounded-xl shadow-sm p-6 mb-8">
                <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6">
                    <h3 class="text-lg font-bold text-gray-800">学习趋势</h3>
                    <div class="flex gap-2 mt-4 md:mt-0">
                        <button class="px-3 py-1 text-sm bg-primary text-white rounded-lg">周</button>
                        <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded-lg hover:bg-gray-200 transition-colors">月</button>
                        <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded-lg hover:bg-gray-200 transition-colors">年</button>
                    </div>
                </div>
                <div class="h-64">
                    <canvas id="learningChart"></canvas>
                </div>
            </div>

            <!-- 记录筛选与列表 -->
            <div class="bg-white rounded-xl shadow-sm overflow-hidden mb-8">
                <div class="p-6 border-b border-gray-100">
                    <div class="flex flex-col md:flex-row justify-between gap-4">
                        <h3 class="text-lg font-bold text-gray-800">学习记录</h3>
                        <div class="flex flex-wrap gap-3">
                            <div class="relative">
                                <select class="pl-4 pr-10 py-2 bg-gray-100 rounded-lg text-gray-700 appearance-none focus:outline-none focus:ring-2 focus:ring-primary/20">
                                    <option>全部类型</option>
                                    <option>题库练习</option>
                                    <option>模拟考试</option>
                                    <option>学习路径</option>
                                </select>
                                <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                            </div>
                            <div class="relative">
                                <select class="pl-4 pr-10 py-2 bg-gray-100 rounded-lg text-gray-700 appearance-none focus:outline-none focus:ring-2 focus:ring-primary/20">
                                    <option>全部学科</option>
                                    <option>数学</option>
                                    <option>语文</option>
                                    <option>英语</option>
                                    <option>物理</option>
                                    <option>化学</option>
                                </select>
                                <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                            </div>
                            <div class="relative">
                                <input type="date" class="pl-4 pr-4 py-2 bg-gray-100 rounded-lg text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary/20">
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 记录列表 -->
                <div class="divide-y divide-gray-100">
                    <!-- 记录项1 -->
                    <div class="p-6 hover:bg-gray-50 transition-colors">
                        <div class="flex flex-col md:flex-row md:items-center justify-between gap-4">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-book text-primary text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">高一数学 - 函数单调性练习</h4>
                                    <p class="text-gray-500 text-sm mt-1">题库练习 · 20道题 · 正确率85%</p>
                                    <p class="text-gray-400 text-xs mt-2">今天 14:30-14:55</p>
                                </div>
                            </div>
                            <div class="flex items-center gap-4">
                                <span class="text-success font-medium">完成</span>
                                <a href="#" class="text-primary hover:text-primary/80 transition-colors">
                                    <i class="fa fa-eye mr-1"></i>查看详情
                                </a>
                            </div>
                        </div>
                    </div>

                    <!-- 记录项2 -->
                    <div class="p-6 hover:bg-gray-50 transition-colors">
                        <div class="flex flex-col md:flex-row md:items-center justify-between gap-4">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-accent/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-file-text-o text-accent text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">高一语文期中模拟考试</h4>
                                    <p class="text-gray-500 text-sm mt-1">模拟考试 · 120分钟 · 得分108/150</p>
                                    <p class="text-gray-400 text-xs mt-2">昨天 09:00-11:00</p>
                                </div>
                            </div>
                            <div class="flex items-center gap-4">
                                <span class="text-success font-medium">完成</span>
                                <a href="#" class="text-primary hover:text-primary/80 transition-colors">
                                    <i class="fa fa-eye mr-1"></i>查看详情
                                </a>
                            </div>
                        </div>
                    </div>

                    <!-- 记录项3 -->
                    <div class="p-6 hover:bg-gray-50 transition-colors">
                        <div class="flex flex-col md:flex-row md:items-center justify-between gap-4">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-secondary/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-road text-secondary text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">高考英语核心词汇突破</h4>
                                    <p class="text-gray-500 text-sm mt-1">学习路径 · 第3/10课 · 进行中</p>
                                    <p class="text-gray-400 text-xs mt-2">前天 19:15-20:30</p>
                                </div>
                            </div>
                            <div class="flex items-center gap-4">
                                <span class="text-warning font-medium">进行中</span>
                                <a href="#" class="text-primary hover:text-primary/80 transition-colors">
                                    <i class="fa fa-continue mr-1"></i>继续学习
                                </a>
                            </div>
                        </div>
                    </div>

                    <!-- 记录项4 -->
                    <div class="p-6 hover:bg-gray-50 transition-colors">
                        <div class="flex flex-col md:flex-row md:items-center justify-between gap-4">
                            <div class="flex items-start gap-4">
                                <div class="w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0">
                                    <i class="fa fa-book text-primary text-xl"></i>
                                </div>
                                <div>
                                    <h4 class="font-medium text-gray-800">物理必修二 - 曲线运动习题</h4>
                                    <p class="text-gray-500 text-sm mt-1">题库练习 · 30道题 · 正确率67%</p>
                                    <p class="text-gray-400 text-xs mt-2">06-15 16:40-17:25</p>
                                </div>
                            </div>
                            <div class="flex items-center gap-4">
                                <span class="text-success font-medium">完成</span>
                                <a href="#" class="text-primary hover:text-primary/80 transition-colors">
                                    <i class="fa fa-eye mr-1"></i>查看详情
                                </a>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 分页 -->
                <div class="p-6 flex justify-center">
                    <div class="flex items-center gap-2">
                        <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 text-gray-400 hover:border-primary hover:text-primary transition-colors disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                            <i class="fa fa-chevron-left"></i>
                        </button>
                        <button class="w-10 h-10 flex items-center justify-center rounded-lg bg-primary text-white">1</button>
                        <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 hover:border-primary hover:text-primary transition-colors">2</button>
                        <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 hover:border-primary hover:text-primary transition-colors">3</button>
                        <span class="text-gray-500">...</span>
                        <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 hover:border-primary hover:text-primary transition-colors">8</button>
                        <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 text-gray-700 hover:border-primary hover:text-primary transition-colors">
                            <i class="fa fa-chevron-right"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-12 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <div class="flex items-center mb-4">
                        <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                        <h3 class="text-xl font-bold">学知题库</h3>
                    </div>
                    <p class="text-gray-400 mb-4">智能教育资源平台，助力学生高效学习</p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-weibo"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-wechat"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-qq"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-github"></i>
                        </a>
                    </div>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">快速链接</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">题库</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">学习路径</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">模拟考试</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">关于我们</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">帮助中心</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">使用指南</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">意见反馈</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">隐私政策</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">联系我们</h4>
                    <ul class="space-y-2">
                        <li class="flex items-center">
                            <i class="fa fa-map-marker text-primary mr-2"></i>
                            <span class="text-gray-400">北京市海淀区中关村大街1号</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-phone text-primary mr-2"></i>
                            <span class="text-gray-400">400-123-4567</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-envelope text-primary mr-2"></i>
                            <span class="text-gray-400">contact@xuezhi.com</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-clock-o text-primary mr-2"></i>
                            <span class="text-gray-400">周一至周日 9:00-21:00</span>
                        </li>
                    </ul>
                </div>
            </div>
            
            <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
                <p>&copy; 2025 学知题库 版权所有 | 京ICP备12345678号</p>
            </div>
        </div>
    </footer>

    <!-- JavaScript -->
    <script>
        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('py-2');
                header.classList.remove('py-3');
                header.classList.add('shadow');
            } else {
                header.classList.add('py-3');
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });

        // 学习趋势图表
        document.addEventListener('DOMContentLoaded', function() {
            const ctx = document.getElementById('learningChart').getContext('2d');
            const chart = new Chart(ctx, {
                type: 'line',
                data: {
                    labels: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
                    datasets: [
                        {
                            label: '做题数量',
                            data: [120, 190, 150, 210, 180, 250, 220],
                            borderColor: '#165DFF',
                            backgroundColor: 'rgba(22, 93, 255, 0.1)',
                            tension: 0.4,
                            fill: true
                        },
                        {
                            label: '学习时长(小时)',
                            data: [2.5, 3.8, 2.2, 4.1, 3.5, 6.2, 5.8],
                            borderColor: '#FF7D00',
                            backgroundColor: 'rgba(255, 125, 0, 0.1)',
                            tension: 0.4,
                            fill: true
                        }
                    ]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            position: 'top',
                            align: 'end'
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: true,
                            grid: {
                                drawBorder: false
                            }
                        },
                        x: {
                            grid: {
                                display: false
                            }
                        }
                    }
                }
            });
        });

        // 返回顶部按钮
        const backToTopButton = document.createElement('button');
        backToTopButton.id = 'backToTop';
        backToTopButton.className = 'fixed bottom-6 right-6 bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center shadow-lg opacity-0 transition-opacity duration-300 hover:bg-primary/90';
        backToTopButton.innerHTML = '<i class="fa fa-arrow-up"></i>';
        document.body.appendChild(backToTopButton);
        
        window.addEventListener('scroll', function() {
            if (window.scrollY > 300) {
                backToTopButton.classList.add('opacity-100');
                backToTopButton.classList.remove('opacity-0');
            } else {
                backToTopButton.classList.add('opacity-0');
                backToTopButton.classList.remove('opacity-100');
            }
        });
        
        backToTopButton.addEventListener('click', function() {
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });
    </script>
</body>
</html>